package com.study.bigdata.spark.core.rdd.operator.action

import org.apache.spark.{SparkConf, SparkContext}

object Spark06_RDD_Oper_Action {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local[*]").setAppName("RDD")
    val sc = new SparkContext(conf)

    // TODO 算子 - 行动
    val rdd = sc.makeRDD(List(1,2,3,4),2)
    // 分区间无序，分区内有序
    rdd.foreach(println)
    /*
    1
    3
    2
    4
     */
    sc.stop()
  }

}
